using Microsoft.AspNetCore.Mvc;
using Oracle.ManagedDataAccess.Client;
using System.Reflection;

namespace Lzfy_His_Service.Controllers
{
    /// <summary>
    /// Oracle测试控制器 - 用于Oracle数据库连接测试
    /// </summary>
    [ApiController]
    [Route("api/[controller]")]
    [ApiExplorerSettings(IgnoreApi = true)]
    public class OracleTestController : ControllerBase
    {
        private readonly ILogger<OracleTestController> _logger;

        public OracleTestController(ILogger<OracleTestController> logger)
        {
            _logger = logger;
        }

        /// <summary>
        /// 测试Oracle数据库连接 - 已禁用
        /// </summary>
        /// <returns>禁用状态</returns>
        [HttpPost("test-connection")]
        public IActionResult TestOracleConnection()
        {
            _logger.LogWarning("Oracle连接测试接口已被禁用");
            return NotFound(new { message = "此接口已被禁用" });
        }

        /// <summary>
        /// 获取Oracle驱动信息 - 已禁用
        /// </summary>
        /// <returns>禁用状态</returns>
        [HttpGet("driver-info")]
        public IActionResult GetOracleDriverInfo()
        {
            _logger.LogWarning("Oracle驱动信息接口已被禁用");
            return NotFound(new { message = "此接口已被禁用" });
        }

        /// <summary>
        /// 测试Oracle连接池 - 已禁用
        /// </summary>
        /// <returns>禁用状态</returns>
        [HttpPost("test-connection-pool")]
        public IActionResult TestConnectionPool()
        {
            _logger.LogWarning("Oracle连接池测试接口已被禁用");
            return NotFound(new { message = "此接口已被禁用" });
        }
    }
}